package com.sright.bcard.enterprise.web.controller;

import com.sright.bcard.common.service.share.mvcresolver.EnableLoginAuth;
import com.sright.bcard.content.share.service.TemplateService;
import com.sright.common.response.SrightResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/template")
public class TemplateController {

    @Autowired
    private TemplateService templateService;

    /**
     * 查询所有的template列表
     * @return
     */
    @GetMapping("/templates.json")
    @EnableLoginAuth
    public SrightResponse templates() {
        return templateService.templates();
    }

}
